import Card from '../../../Common/Card/';
import {cbs} from '../../../../config/settings.js';

module.exports = {
  name: 'list',
  data(){
  	return{
    	productList: [],
      page: 1,
      size: 5,
      total: 0
  	}
  },
  methods: {
      getList() {
          let data = {
              water_store_id: this.userinfo.water_store_id,
              page: this.page,
              size: this.size
          }
          // this.$$api_purchase_list(data, res => {
          //     if(res.status === 0) {
          //         this.productList = res.data.water;
          //         this.total = res.data.total;
          //     }else {
          //         cbs.submitError.call(this, `获取商品信息失败，${res.msg}`);
          //     }
          // })
      },
  },
  mounted() {
      this.getList();
  },
  computed: {
      userinfo() {
          return this.$store.state.user.userinfo;
      },
  },
  components: {
     Card
  }
}